home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / telecomm / zmdm.zoo / ghi5025.s < prev    next >
Text File  |  1991-04-27  |  2KB  |  79 lines

  1. |
  2. |  Make hi rez screen bios handle 50 lines of 8x8 characters
  3. |
  4. |  Adapted to Gnu C use from origional asm posting
  5. |
  6. |
  7.     .text
  8.     .globl _hi50
  9.  
  10. _hi50:                  | switch to 50 line mode
  11.     moveml    a2/d2,sp@-
  12.  
  13.     .word    0xA000          | get the important pointers (line A init)
  14.  
  15.     movl    a1@(4),a1      | a1 -> 8x8 font header
  16.  
  17.     movl  a1@(72),a0@(-10)  | v_off_ad <- 8x8 offset table addr
  18.     movl  a1@(76),a0@(-22)  | v_fnt_ad <- 8x8 font data addr
  19.  
  20.     moveq    #8,d0
  21.     movw    d0,a0@(-0x2E)    | v_cel_ht <- 8    8x8 cell height    
  22.     movw    a0@(-0x04),d1    | vertical pixel resolution
  23.     extl    d1
  24.     divu    d0,d1        | d1 : # rows : 50
  25.     subl    #1,d1
  26.     movw    d1,a0@(-0x2A)    | v_cel_my <- 49   maximum cell "Y"
  27.     movw    a0@(0x02),d1    | ld_vwrap
  28.     mulu    d0,d1        | * v_cel_ht
  29.     movw    d1,a0@(-0x28)    | -> v_cel_my
  30.                 | offset to cell Y+1
  31.  
  32.     moveml    sp@+,a2/d2
  33.     rts              | and return
  34.  
  35.    
  36. |
  37. | Make hi rez screen bios handle 25 lines of 8x16 characters
  38. |
  39.  
  40.     .even
  41.     .globl _hi25
  42.  
  43. _hi25:                  | Switch to 25 lines display
  44.     moveml    a2/d2,sp@-
  45.  
  46.     .word   0xA000          | get the important pointers
  47.     
  48.     movl    a1@(8),a1      | a1 -> 8x16 font header
  49.  
  50.     movl  a1@(72),a0@(-10)  | v_off_ad <- 8x16 offset table addr
  51.     movl  a1@(76),a0@(-22)  | v_fnt_ad <- 8x16 font data addr
  52.  
  53.     moveq    #16,d0
  54.     movw    d0,a0@(-0x2E)      | v_cel_ht <- 16    8x16 cell height
  55.     movw    a0@(-4),d1      | v_rez_vt
  56.     extl    d1
  57.     divu    d0,d1          | d1 = # rows: 25
  58.     subl    #1,d1
  59.     movw    d1,a0@(-0x2A)      | v_cel_my <- 24    maximum cell "Y"
  60.     movw    a0@(2),d1      | ld_vwrap
  61.     mulu    d0,d1          | * v_cel_ht
  62.     movw    d1,a0@(-0x28)      |  v_cel_wr <- 1280  vertical byte offset
  63.  
  64.     moveml    sp@+,a2/d2
  65.     rts              | bye
  66.  
  67. |
  68. | return lineA base
  69. |
  70.     .even
  71.     .globl _aaddress
  72.  
  73. _aaddress:
  74.     moveml    a2/d2,sp@-
  75.  
  76.     .word    0xa000        | a0 and d0 contain base
  77.     moveml    sp@+,a2/d2
  78.     rts
  79.